Skip to content

Read client steps from remote config#6941

Closed
alfonso-noriega wants to merge 1 commit into03-10-add_client_steps_implementation_to_support_existing_functionalitiesfrom
03-06-read_client_steps_from_remote_config
Closed

Read client steps from remote config#6941
alfonso-noriega wants to merge 1 commit into03-10-add_client_steps_implementation_to_support_existing_functionalitiesfrom
03-06-read_client_steps_from_remote_config

Conversation

@alfonso-noriega
Copy link
Contributor

@alfonso-noriega alfonso-noriega commented Mar 6, 2026

WHY are these changes introduced?

Extension specifications need to include client steps information to support build processes that require step-by-step client-side operations.

WHAT is this pull request doing?

  • Adds clientSteps field to the GraphQL query for fetching extension specifications
  • Updates the RemoteSpecification interface to include a clientSteps property of type ClientSteps
  • Implements parsing logic in AppManagementClient to convert the string-based clientSteps field from the API response into a structured ClientSteps array
  • Imports the ClientSteps type from the build services module

How to test your changes?

  1. Run the application and trigger a fetch of extension specifications
  2. Verify that the clientSteps field is properly retrieved from the GraphQL API
  3. Confirm that the client steps are correctly parsed and available in the specification objects

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes

Copy link
Contributor Author

alfonso-noriega commented Mar 6, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@alfonso-noriega alfonso-noriega marked this pull request as ready for review March 6, 2026 13:47
@alfonso-noriega alfonso-noriega requested a review from a team as a code owner March 6, 2026 13:47
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

We detected some changes at packages/*/src and there are no updates in the .changeset.
If the changes are user-facing, run pnpm changeset add to track your changes and include them in the next release CHANGELOG.

Caution

DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release.

@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch from b6f6989 to 92899bf Compare March 6, 2026 14:04
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 79.19% 14700/18562
🟡 Branches 73.41% 7301/9946
🟡 Functions 79.33% 3741/4716
🟡 Lines 79.53% 13891/17466

Test suite run success

3847 tests passing in 1474 suites.

Report generated by 🧪jest coverage report action from 909aef3

@alfonso-noriega alfonso-noriega force-pushed the 01-build-steps-infrastructure branch from ce4a75e to 4088d90 Compare March 6, 2026 16:51
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch 2 times, most recently from 55fc27f to b5573b3 Compare March 6, 2026 16:55
function parseClientSteps(clientSteps: string | null | undefined): ClientSteps | undefined {
if (!clientSteps) return undefined
return JSON.parse(clientSteps)
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unhandled JSON.parse can crash specifications fetch

clientSteps is sourced from a remote API field (spec.clientSteps) and is parsed with JSON.parse without a try/catch. If the API returns invalid JSON (e.g., empty string, partially-written JSON, a plain string, or an unexpectedly formatted value), JSON.parse will throw and the entire specifications() call will reject.

Evidence:

function parseClientSteps(clientSteps: string | null | undefined): ClientSteps | undefined {
  if (!clientSteps) return undefined
  return JSON.parse(clientSteps)
}

This can make the CLI fail to fetch extension specifications, potentially breaking deploy/build flows for users receiving malformed clientSteps (or during a transient backend bug).

@binks-code-reviewer
Copy link

🤖 Code Review · #projects-dev-ai for questions
React with 👍/👎 or reply — all feedback helps improve the agent.

Complete - 1 findings

📋 History

✅ 1 findings

@alfonso-noriega alfonso-noriega force-pushed the 01-build-steps-infrastructure branch from 4088d90 to e9af6ce Compare March 9, 2026 09:51
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch 2 times, most recently from b513dcb to 27d6a77 Compare March 9, 2026 10:36
@alfonso-noriega alfonso-noriega force-pushed the 01-build-steps-infrastructure branch 2 times, most recently from 028d41e to e312b08 Compare March 9, 2026 10:37
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch from 27d6a77 to c72d83b Compare March 9, 2026 10:37
@alfonso-noriega alfonso-noriega changed the base branch from 01-build-steps-infrastructure to graphite-base/6941 March 10, 2026 08:33
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch from c72d83b to 9e042a7 Compare March 10, 2026 08:34
@alfonso-noriega alfonso-noriega changed the base branch from graphite-base/6941 to 03-10-add_client_steps_implementation_to_support_existing_functionalities March 10, 2026 08:34
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch from 9e042a7 to 6bf2ab6 Compare March 10, 2026 08:47
@alfonso-noriega alfonso-noriega force-pushed the 03-10-add_client_steps_implementation_to_support_existing_functionalities branch from e60fc83 to 9c2e1fd Compare March 10, 2026 08:47
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch from 6bf2ab6 to fe8b229 Compare March 10, 2026 09:04
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch 2 times, most recently from d2eccd1 to c707af8 Compare March 10, 2026 13:21
@alfonso-noriega alfonso-noriega force-pushed the 03-10-add_client_steps_implementation_to_support_existing_functionalities branch 2 times, most recently from 5e27f1f to e03b479 Compare March 10, 2026 14:45
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch from c707af8 to 0eb54f3 Compare March 10, 2026 14:45
@alfonso-noriega alfonso-noriega force-pushed the 03-10-add_client_steps_implementation_to_support_existing_functionalities branch from e03b479 to ca267e2 Compare March 10, 2026 14:52
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch from 0eb54f3 to 9eaca1c Compare March 10, 2026 14:52
@alfonso-noriega alfonso-noriega force-pushed the 03-10-add_client_steps_implementation_to_support_existing_functionalities branch from ca267e2 to 991bfa9 Compare March 10, 2026 15:18
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch from 9eaca1c to 0591ba8 Compare March 10, 2026 15:18
@alfonso-noriega alfonso-noriega force-pushed the 03-10-add_client_steps_implementation_to_support_existing_functionalities branch from 991bfa9 to c673b4a Compare March 10, 2026 15:23
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch 2 times, most recently from 8ccd857 to d695822 Compare March 10, 2026 15:51
@alfonso-noriega alfonso-noriega force-pushed the 03-10-add_client_steps_implementation_to_support_existing_functionalities branch from c673b4a to 6a3974c Compare March 10, 2026 15:51
identifier
externalIdentifier
features
clientSteps
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am worried about the coupling of client <> server we're doing here and the implications it has.

@alfonso-noriega alfonso-noriega force-pushed the 03-10-add_client_steps_implementation_to_support_existing_functionalities branch from 6a3974c to 6805ca4 Compare March 11, 2026 17:37
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch from d695822 to 0521ec5 Compare March 11, 2026 17:37
@alfonso-noriega alfonso-noriega force-pushed the 03-10-add_client_steps_implementation_to_support_existing_functionalities branch from 6805ca4 to be0c2a6 Compare March 12, 2026 08:33
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch from 0521ec5 to 297a4a7 Compare March 12, 2026 08:33
@alfonso-noriega alfonso-noriega force-pushed the 03-10-add_client_steps_implementation_to_support_existing_functionalities branch from be0c2a6 to 9d3a398 Compare March 12, 2026 10:30
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch from 297a4a7 to 62d969b Compare March 12, 2026 10:30
@alfonso-noriega alfonso-noriega force-pushed the 03-10-add_client_steps_implementation_to_support_existing_functionalities branch from 9d3a398 to 2df6f2a Compare March 12, 2026 10:45
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch 2 times, most recently from 6e1531e to 23ec4ff Compare March 12, 2026 12:11
@alfonso-noriega alfonso-noriega force-pushed the 03-10-add_client_steps_implementation_to_support_existing_functionalities branch from 2df6f2a to 7dc49dc Compare March 12, 2026 12:11
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch from 23ec4ff to fed4a70 Compare March 12, 2026 12:30
@alfonso-noriega alfonso-noriega force-pushed the 03-10-add_client_steps_implementation_to_support_existing_functionalities branch from 7dc49dc to 6ed0e29 Compare March 12, 2026 12:30
@alfonso-noriega alfonso-noriega force-pushed the 03-10-add_client_steps_implementation_to_support_existing_functionalities branch from 6ed0e29 to ba771b8 Compare March 12, 2026 13:19
@alfonso-noriega alfonso-noriega force-pushed the 03-06-read_client_steps_from_remote_config branch from fed4a70 to 909aef3 Compare March 12, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants